<template>
  <cover-view class="BaseBottom">
    <cover-view class="BaseBottomBox">
      <cover-view
        class="BaseBottomBoxItem"
        v-for="(v, i) in arr"
        :key="i"
        @click="goLink(v)"
      >
        <cover-image
          class="iconSee"
          :src="selectPath == v.link ? v.selectedIconPath : v.iconPath"
          mode="widthFix"
        ></cover-image>
        <cover-view class="textSee">{{ v.text }}</cover-view>
      </cover-view>
    </cover-view>
  </cover-view>
</template>

<script>
import { user, broker } from "../../utils/baseBottom";

export default {
  data() {
    return {
      call: "",
      arr: uni.getStorageSync('identity') ? broker : user
    };
  },
  props: {
    selectPath: {
      type: String,
      default: "",
    },
  },
  methods: {
    goLink(v) {
      uni.reLaunch({
        url: v.link,
      });
    },
  },
};
</script>

<style scoped lang="less">
.BaseBottom {
  height: 108rpx;
  width: 100%;
  position: fixed;
  bottom: 0;
  background: #fff;
  border-top: 1rpx solid #f2f2f2;
  .BaseBottomBox {
    display: flex;
    justify-content: space-between;
    text-align: center;
    .BaseBottomBoxItem {
      width: 25%;
      height: 108rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-content: space-around;
      align-items: center;
      .iconSee {
        width: 43rpx;
        height: 41rpx;
      }
      .textSee {
        font-size: 24rpx;
        color: #9e9c9c;
      }
    }
  }
}
</style>